<%@page trimDirectiveWhitespaces="true"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- Errors -->
<!-- Loading screen -->
<div id="loadingScreen"></div>
<!-- Register form -->
<div id="user_datas">
 <div id="errorData" class="formCachedError">
  <spring:message code="error.field.error.begin" />
  "<span id="fieldName"></span>"
  <spring:message code="error.field.error.end" />
 </div>
 <div id="fieldError" class="formCachedError"></div>
 <div id="errorAddressUnknown" class="formCachedError">
  <spring:message code="error.address.unknown" />
 </div>
 <div id="errorList" class="formError">
  <c:forEach items="${errorList}" var="error">
   <spring:message code="${error}" />
   <br />
  </c:forEach>
 </div>
 <form:form method="post" action="../change/address" commandName="address" class="withAddress">
  <form:hidden path="userId" />
  <form:hidden path="username" />
  <tags:columnInputText label="label.postal.address" id="postalAddress" big="true" mandatory="true" />
  <!-- 8th line -->
  <sec:authorize access="hasRole('ROLE_PROFESSIONAL')">
   <tags:columnInputText label="label.post.office.box" id="postOfficeBox" />
   <tags:columnInputSelect label="label.department" id="departmentCode" items="${departmentList}"
    mandatory="true" withEmpty="true" />
  </sec:authorize>
  <div class="clear"></div>
  <!-- 9th line -->
  <tags:columnInputText label="label.postal.code" id="postalCode" mandatory="true" />
  <tags:columnInputText label="label.city" id="city" mandatory="true" />
  <!-- Last line before -->
  <form:hidden path="lat" />
  <form:hidden path="lng" />
  <div class="formBigColumn">
   <spring:message code="label.change.address" var="submit" />
   <input type="button" name="address_button" value="${submit}" id="address_button" />
  </div>
  <div class="clear"></div>
 </form:form>
</div>